<?php

namespace App\Admin\Extensions\Tools;

use Encore\Admin\Admin;
use Encore\Admin\Grid\Tools\AbstractTool;
use Illuminate\Support\Facades\Request;

class HrefButton extends AbstractTool
{
    protected $icon;
    protected $label;
    protected $type;
    protected $url;
    protected $attribute_id;

    public function __construct($icon, $label, $type, $url, $attribute_id = '')
    {
        $this->icon = $icon;
        $this->label = $label;
        $this->type = $type;
        $this->url = $url;
        $this->attribute_id = $attribute_id;
    }

    protected function script()
    {
    }

    public function render()
    {
        return view('admin.tools.hrefButton', [
            'icon' => $this->icon,
            'label' => $this->label,
            'type' => $this->type,
            'url' => $this->url,
            'attribute_id' => $this->attribute_id,
        ]);
    }
}